import request from '@/utils/request'

// 操作日志接口
export const operationLogApi = {
  getOperationLogs: (params) => {
    return request({
      url: '/api/OperationLog/List',
      method: 'get',
      params
    })
  },
  getOperationLogDetail: (id) => {
    return request({
      url: `/api/OperationLog/${id}`,
      method: 'get'
    })
  },
  exportOperationLogs: (params) => {
    return request({
      url: '/api/OperationLog/Export',
      method: 'get',
      params,
      responseType: 'blob'
    })
  }
}

// 登录日志接口
export const loginLogApi = {
  getLoginLogs: (params) => {
    return request({
      url: '/api/LoginLog/List',
      method: 'get',
      params
    })
  },
  getLoginLogDetail: (id) => {
    return request({
      url: `/api/LoginLog/${id}`,
      method: 'get'
    })
  },
  exportLoginLogs: (params) => {
    return request({
      url: '/api/LoginLog/Export',
      method: 'get',
      params,
      responseType: 'blob'
    })
  }
}
